local card_extension = Package:new("zhonger_heg_cards", Package.CardPack)
card_extension.extensionName = "ze_heg"

local extension = Package:new("zhonger_heg_generals")
extension.extensionName = "ze_heg"

Fk:loadTranslationTable{
  ["zhonger_heg_cards"] = "经典国战",
  ["zhonger_heg_generals"] = "标准包",
  ["zhonger_st_heg"] = "国标"
}

local H = require "packages/hegemony/util"
local U = require "packages/utility/utility"

local standard_cards = require "packages/hegemony/hegemony_cards"
local strategic_advantage = require "packages/hegemony/strategic_advantage"
local formation_cards = require "packages/hegemony/formation"[2]
local momentum_cards = require "packages/hegemony/momentum"[2]
local transformation_cards = require "packages/hegemony/transformation"[2]
local power_cards = require "packages/hegemony/power"[2]

local card_packs = {standard_cards, strategic_advantage, formation_cards, momentum_cards, transformation_cards, power_cards}

local ban_cards = {"double_swords", "jingfan","six_swords", "zhuahuangfeidian"}

for _, extension in ipairs(card_packs) do
  for _, card in ipairs(extension.cards) do
    if not table.contains(ban_cards, card.name) then
      local c = Fk:cloneCard(card.name, card.suit, card.number)
      card_extension:addCard(c)
      if table.contains(H.allianceCards, card) then
        table.insert(H.allianceCards, c)
      end
    end
  end
end


local caocao = General(extension, "zhonger_st_heg__caocao", "wei", 4, 4,  General.Male)

caocao:addSkill("jianxiong")
caocao:addCompanions({"zhonger_st_heg__dianwei", "zhonger_st_heg__xuchu"})
Fk:loadTranslationTable{
  ["zhonger_st_heg__caocao"] = "曹操",
  ["#zhonger_st_heg__caocao"] = "魏武帝",
  ["illustrator:zhonger_st_heg__caocao"] = "KayaK",
  ["~zhonger_st_heg__caocao"] = "霸业未成，未成啊……",
}

local simayi = General(extension, "zhonger_st_heg__simayi", "wei", 3, 3,  General.Male)
simayi:addSkill("fankui")
simayi:addSkill("ex__guicai") -- 手杀
Fk:loadTranslationTable{
  ["zhonger_st_heg__simayi"] = "司马懿",
  ["#zhonger_st_heg__simayi"] = "狼顾之鬼",
  ["illustrator:zhonger_st_heg__simayi"] = "木美人",
  ["$fankui_zhonger_st_heg__simayi1"]="哼！正中下怀！",
  ["$fankui_zhonger_st_heg__simayi2"]="哼！自作孽不可活！",
  ["~zhonger_st_heg__simayi"] = "我的气数就到这里了吗？",
}

local xiahoudun = General(extension, "zhonger_st_heg__xiahoudun", "wei", 4, 4,  General.Male)
xiahoudun:addSkill("ex__ganglie")
xiahoudun:addCompanions("zhonger_st_heg__xiahouyuan")
Fk:loadTranslationTable{
  ["zhonger_st_heg__xiahoudun"] = "夏侯惇",
  ["#zhonger_st_heg__xiahoudun"] = "独眼的罗刹",
  ["illustrator:zhonger_st_heg__xiahoudun"] = "DH",
  ["~zhonger_st_heg__xiahoudun"] = "诸多败绩，有负丞相重托……",
}

local zhangliao = General(extension, "zhonger_st_heg__zhangliao", "wei", 4, 4,  General.Male)
zhangliao:addSkill("ex__tuxi") -- 手杀
Fk:loadTranslationTable{
  ["zhonger_st_heg__zhangliao"] = "张辽",
  ["#zhangliao"] = "前将军",
  ["illustrator:zhangliao"] = "张帅",
  ["~zhonger_st_heg__zhangliao"] = "被敌人占了先机……呃……",
}

local xuchu = General(extension, "zhonger_st_heg__xuchu", "wei", 4, 4,  General.Male)
local zhonger_st_heg__luoyi = fk.CreateTriggerSkill{
  name = "zhonger_st_heg__luoyi",
  anim_type = "offensive",
  events = {fk.EventPhaseEnd},
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(self) and player.phase == Player.Draw
  end,
  on_use = function(self, event, target, player, data)
    player.room:askForDiscard(player, 1, 1, false, self.name, false, nil, "zhonger_st_heg__luoyi-ask", false)
  end,
}
local zhonger_st_heg__luoyi_trigger = fk.CreateTriggerSkill{
  name = "#zhonger_st_heg__luoyi_trigger",
  mute = true,
  events = {fk.DamageCaused},
  can_trigger = function(self, event, target, player, data)
    return target == player and player:usedSkillTimes("zhonger_st_heg__luoyi", Player.HistoryTurn) > 0 and
      not data.chain and data.card and (data.card.trueName == "slash" or data.card.name == "duel")
  end,
  on_cost = function(self, event, target, player, data)
    return true
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    player:broadcastSkillInvoke("zhonger_st_heg__luoyi")
    room:notifySkillInvoked(player, "zhonger_st_heg__luoyi")
    data.damage = data.damage + 1
  end,
}

zhonger_st_heg__luoyi:addRelatedSkill(zhonger_st_heg__luoyi_trigger)
xuchu:addSkill("hs__luoyi")
Fk:loadTranslationTable{
  ["zhonger_st_heg__xuchu"] = "许褚",
  ["#xuchu"] = "虎痴",
  ["illustrator:xuchu"] = "KayaK",
  ["$hs__luoyi_zhonger_st_heg__xuchu1"] = "脱！",
  ["$hs__luoyi_zhonger_st_heg__xuchu2"] = "谁来与我大战三百回合？",
  ["~zhonger_st_heg__xuchu"] = "冷，好冷啊……",
}

local guojia = General(extension, "zhonger_st_heg__guojia", "wei", 3, 3,  General.Male)
guojia:addSkill("hs__yiji")
guojia:addSkill("tiandu")
Fk:loadTranslationTable{
  ["zhonger_st_heg__guojia"] = "郭嘉",
  ["#zhonger_st_heg__guojia"] = "早终的先知",
  ["illustrator:zhonger_st_heg__guojia"] = "绘聚艺堂",
  ["~zhonger_st_heg__guojia"] = "咳，咳……",
}

local zhenji = General(extension, "zhonger_st_heg__zhenji", "wei", 3, 3, General.Female)
zhenji:addSkill("hs__luoshen")
zhenji:addSkill("qingguo")
zhenji:addCompanions("zhonger_st_heg__caopi")

Fk:loadTranslationTable{
  ["zhonger_st_heg__zhenji"] = "甄姬",
  ["#zhonger_st_heg__zhenji"] = "薄幸的美人",
  ["illustrator:zhonger_st_heg__zhenji"] = "DH",
  ["~zhonger_st_heg__zhenji"] = "悼良会之永绝兮，哀一逝而异乡。",
}

local xiahouyuan = General(extension, "zhonger_st_heg__xiahouyuan", "wei", 4 ,4, General.Male)
xiahouyuan:addSkill("hs__shensu")
Fk:loadTranslationTable{
  ["zhonger_st_heg__xiahouyuan"] = "夏侯渊",
  ["#zhonger_st_heg__xiahouyuan"] = "疾行的猎豹",
  ["~zhonger_st_heg__xiahouyuan"] = "竟然……比我还……快……",
}

local zhanghe = General(extension, "zhonger_st_heg__zhanghe", "wei", 4, 4,  General.Male)
zhanghe:addSkill("qiaobian")
Fk:loadTranslationTable{
  ["zhonger_st_heg__zhanghe"] = "张郃",
  ["#zhonger_st_heg__zhanghe"] = "料敌机先",
  ["illustrator:zhonger_st_heg__zhanghe"] = "张帅",
  ["~zhonger_st_heg__zhanghe"] = "呃，膝盖中箭了……",
}

local xuhuang = General(extension, "zhonger_st_heg__xuhuang", "wei", 4, 4,  General.Male)
xuhuang:addSkill("hs__duanliang")
Fk:loadTranslationTable{
  ["zhonger_st_heg__xuhuang"] = "徐晃",
  ["#zhonger_st_heg__xuhuang"] = "周亚夫之风",
  ["illustrator:zhonger_st_heg__xuhuang"] = "Tuu.",
  ["~zhonger_st_heg__xuhuang"] = "一顿不吃饿得慌。",
}

local caoren = General(extension, "zhonger_st_heg__caoren", "wei", 4, 4,  General.Male)
caoren:addSkill("hs__jushou")
Fk:loadTranslationTable{
  ["zhonger_st_heg__caoren"] = "曹仁",
  ["#zhonger_st_heg__caoren"] = "大将军",
  ["illustrator:zhonger_st_heg__caoren"] = "Ccat",
  ["$hs__jushou_zhonger_st_heg__caoren1"] = "兵精粮足，守土一方。",
  ["$hs__jushou_zhonger_st_heg__caoren2"] = "坚守此地，不退半步。",
  ["~zhonger_st_heg__caoren"] = "长江以南，再无王土矣。",
}

local dianwei = General(extension, "zhonger_st_heg__dianwei", "wei", 5, 5, General.Male)
dianwei:addSkill("qiangxi")
Fk:loadTranslationTable{
  ['zhonger_st_heg__dianwei'] = '典韦',
  ["#zhonger_st_heg__dianwei"] = "古之恶来",
  ["illustrator:zhonger_st_heg__dianwei"] = "小冷",
  ["~zhonger_st_heg__dianwei"] = "主公，快走！",
}

local xunyu = General(extension, "zhonger_st_heg__xunyu", "wei", 3, 3,  General.Male)
xunyu:addSkill("quhu")
local jieming = fk.CreateTriggerSkill{
  name = "heg_jieming",
  anim_type = "masochism",
  events = {fk.Damaged},
  can_trigger = function(self, event, target, player, data)
    if target == player then
      if event == fk.Damaged then
        return player:hasSkill(self)
      end
    end
  end,
  on_cost = function(self, event, target, player, data)
    local to = player.room:askForChoosePlayers(player, table.map(player.room:getAlivePlayers(), Util.IdMapper), 1, 1, "#heg_jieming-choose", self.name, true)
    if #to > 0 then
      self.cost_data = to[1]
      return true
    end
    self.cancel_cost = true
  end,
  on_use = function(self, event, target, player, data)
    local to = player.room:getPlayerById(self.cost_data)
    if to.dead then return false end
    local x = #to.player_cards[Player.Hand] - math.min(to.maxHp, 5)
    local m = -x
    if m > 0 then
      to:drawCards(m, self.name)
    end
  end,
}
xunyu:addSkill(jieming)
Fk:loadTranslationTable{
  ['zhonger_st_heg__xunyu'] = '荀彧',
  ["#zhonger_st_heg__xunyu"] = "王佐之才",
  ["illustrator:zhonger_st_heg__xunyu"] = "LiuHeng",
  ["heg_jieming"] = "节命",
  [":heg_jieming"] = "当你受到伤害后，你可令一名角色将手牌摸至X张（X为其体力上限且至多为5）。",
  ["#heg_jieming-choose"] = "节命：你可以令一名角色将手牌摸至X张（X为其体力上限且至多为5）",
  ["$heg_jieming1"] = "我，永不背弃。	",
  ["$heg_jieming2"] = "秉忠贞之志，守谦退之节。",
  ["~zhonger_st_heg__xunyu"] = "主公要臣死，臣不得不死。",
}

local caopi = General(extension, "zhonger_st_heg__caopi", "wei", 3, 3,  General.Male)
caopi:addSkill("xingshang")
local fangzhu = fk.CreateTriggerSkill{
  name = "heg_fangzhu",
  anim_type = "masochism",
  events = {fk.Damaged},
  on_cost = function(self, event, target, player, data)
    local to = player.room:askForChoosePlayers(player, table.map(player.room:getOtherPlayers(player), Util.IdMapper), 1, 1, "#heg_fangzhu-choose:::"..player:getLostHp(), self.name, true)
    if #to > 0 then
      self.cost_data = to[1]
      return true
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local to = room:getPlayerById(self.cost_data)
    local num = player:getLostHp()
    if to.hp > 0 and #room:askForDiscard(to, num, num, true, self.name, true, nil, "#heg_fangzhu-ask:::" .. num, false) > 0 then
      if not to.dead then room:loseHp(to, 1, self.name) end
    else
      to:drawCards(num, self.name)
      if not to.dead then to:turnOver() end
    end
  end,
}
caopi:addSkill(fangzhu)
Fk:loadTranslationTable{
  ['zhonger_st_heg__caopi'] = '曹丕',
  ["#zhonger_st_heg__caopi"] = "霸业的继承者",
  ["illustrator:zhonger_st_heg__caopi"] = "DH",
  ["heg_fangzhu"] = "放逐",
  [":heg_fangzhu"] = "当你受到伤害后，你可以令一名其他角色选择一项：1.弃置X张牌并失去1点体力；2.摸X张牌并叠置武将牌（X为你已损失的体力值）。",
  ["#heg_fangzhu-choose"] = "放逐：你可令一名其他角色选择摸%arg张牌并翻面，或弃置%arg张牌并失去1点体力",
  ["#heg_fangzhu-ask"] = "放逐：弃置%arg张牌并失去1点体力，或点击“取消”，摸%arg张牌并翻面",
  ["$heg_fangzhu1"] = "死罪可免，活罪难赦！",
  ["$heg_fangzhu2"] = "给我翻过来！",
  ["~zhonger_st_heg__caopi"] = "子建，子建……",
}

local yuejin = General(extension, "zhonger_st_heg__yuejin", "wei", 4, 4,  General.Male)
yuejin:addSkill("xiaoguo")
Fk:loadTranslationTable{
  ["zhonger_st_heg__yuejin"] = "乐进",
  ["#zhonger_st_heg__yuejin"] = "奋强突固",
  ["illustrator:zhonger_st_heg__yuejin"] = "巴萨小马",
  ["desinger:zhonger_st_heg__yuejin"] = "淬毒",
  ["~zhonger_st_heg__yuejin"] = "箭疮发作，吾命休矣。",
}

local liubei = General(extension, "zhonger_st_heg__liubei", "shu", 4, 4,  General.Male)
liubei:addSkill("ex__rende")
liubei:addCompanions({"zhonger_st_heg__guanyu", "zhonger_st_heg__zhangfei", "zhonger_st_heg__ganfuren"})
Fk:loadTranslationTable{
  ["zhonger_st_heg__liubei"] = "刘备",
  ["#zhonger_st_heg__liubei"] = "乱世的枭雄",
  ["illustrator:zhonger_st_heg__liubei"] = "木美人",
  ["~zhonger_st_heg__liubei"] = "汉室未兴，祖宗未耀，朕实不忍此时西去……",
}

local guanyu = General(extension, "zhonger_st_heg__guanyu", "shu", 5, 5, General.Male)
guanyu:addSkill("hs__wusheng")
Fk:loadTranslationTable{
  ["zhonger_st_heg__guanyu"] = "关羽",
  ["#zhonger_st_heg__guanyu"] = "美髯公",
  ["illustrator:zhonger_st_heg__guanyu"] = "KayaK",
  ["~zhonger_st_heg__guanyu"] = "什么？此地名叫麦城？",
}

local zhangfei = General(extension, "zhonger_st_heg__zhangfei", "shu", 4, 4,  General.Male)
zhangfei:addSkill("hs__paoxiao")
Fk:loadTranslationTable{
  ["zhonger_st_heg__zhangfei"] = "张飞",
  ["#zhonger_st_heg__zhangfei"] = "万夫不当",
  ["~zhonger_st_heg__zhangfei"] = "实在是杀不动了……",
}

local zhugeliang = General(extension, "zhonger_st_heg__zhugeliang", "shu", 3, 3,  General.Male)
zhugeliang:addSkill("hs__guanxing")
local kongcheng = fk.CreateTriggerSkill{
  name = "emptycity",
  anim_type = "defensive",
  events = {fk.TargetConfirming, fk.BeforeCardsMove, fk.EventPhaseStart},
  frequency = Skill.Compulsory,
  can_trigger = function(self, event, target, player, data)
    if not player:hasSkill(self) then return false end
    if event == fk.EventPhaseStart then
      return player == target and player.phase == Player.Draw and #player:getPile("empty") > 0
    else
      if event == fk.TargetConfirming then
        if not player:isKongcheng() then return false end
        return target == player and (data.card.trueName == "slash" or data.card.name == "duel")
      elseif event == fk.BeforeCardsMove then
        if player.phase ~= Player.NotActive then return false end
        for _, move in ipairs(data) do
          if move.moveReason == fk.ReasonGive and move.to == player.id and move.toArea == Card.PlayerHand then
            return true
          end
        end
      end
    end
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    if event == fk.TargetConfirming then
      AimGroup:cancelTarget(data, player.id)
      return true
    elseif event == fk.BeforeCardsMove then
      local mirror_moves = {}
      for _, move in ipairs(data) do
        if move.moveReason == fk.ReasonGive and move.to == player.id and move.toArea == Card.PlayerHand then
          local mirror_info = move.moveInfo
          if #mirror_info > 0 then
            move.moveInfo = {}
            local mirror_move = table.clone(move)
            mirror_move.toArea = Card.PlayerSpecial
            mirror_move.specialName = "empty"
            mirror_move.visible = true
            mirror_move.moveMark = nil
            mirror_move.moveInfo = mirror_info
            table.insert(mirror_moves, mirror_move)
          end
        end
      end
      table.insertTable(data, mirror_moves)
    else
      room:obtainCard(player, player:getPile("empty"), true)
    end
  end
}
zhugeliang:addSkill(kongcheng)
zhugeliang:addCompanions("zhonger_st_heg__huangyueying")
Fk:loadTranslationTable{
  ["zhonger_st_heg__zhugeliang"] = "诸葛亮",
  ["#zhonger_st_heg__zhugeliang"] = "迟暮的丞相",
  ["illustrator:zhonger_st_heg__zhugeliang"] = "木美人",
  ["emptycity"] = "空城",
  [":emptycity"] = "锁定技，1.当你成为【杀】或【决斗】的目标时，若你没有手牌，取消之；"..
    "2. 你的回合外，当牌因交给而移至你的手牌区前，你将此次移动的目标区域改为你的武将牌上（均称为“空城”），摸牌阶段开始时，你获得所有“空城”。",
  ["empty"] = "空城",
  ["$emptycity1"] = "（悠扬的琴音）",
  ["$emptycity2"] = "（低沉的琴音）",
  ["~zhonger_st_heg__zhugeliang"] = "将星陨落，天命难违。",
}

local zhaoyun = General(extension, "zhonger_st_heg__zhaoyun", "shu", 4, 4,  General.Male)
zhaoyun:addSkill("hs__longdan")
zhaoyun:addCompanions("zhonger_st_heg__liushan")

Fk:loadTranslationTable{
  ["zhonger_st_heg__zhaoyun"] = "赵云",
  ["#zhonger_st_heg__zhaoyun"] = "虎威将军",
  ["illustrator:zhonger_st_heg__zhaoyun"] = "DH",
  ["~zhonger_st_heg__zhaoyun"] = "这，就是失败的滋味吗？",
}

local machao = General(extension, "zhonger_st_heg__machao", "shu", 4, 4,  General.Male)
machao:addSkill("mashu")
machao:addSkill("hs__tieqi")
Fk:loadTranslationTable{
  ["zhonger_st_heg__machao"] = "马超",
  ["#zhonger_st_heg__machao"] = "一骑当千",
  ["illustrator:zhonger_st_heg__machao"] = "KayaK&木美人&张帅",
  ["~zhonger_st_heg__machao"] = "请将我，葬在西凉……",
}

local huangyueying = General(extension, "zhonger_st_heg__huangyueying", "shu", 3, 3, General.Female)
huangyueying:addSkill("jizhi")
huangyueying:addSkill("qicai")
huangyueying:addCompanions("zhonger_st_heg__wolong")

Fk:loadTranslationTable{
  ["zhonger_st_heg__huangyueying"] = "黄月英",
  ["#zhonger_st_heg__huangyueying"] = "归隐的杰女",
  ["illustrator:zhonger_st_heg__huangyueying"] = "木美人",
  ["~zhonger_st_heg__huangyueying"] = "亮……",
}

local huangzhong = General(extension, "zhonger_st_heg__huangzhong", "shu", 4, 4,  General.Male)
local liegong = fk.CreateTriggerSkill{
  name = "zhonger_st_heg__liegong",
  anim_type = "offensive",
  events = {fk.TargetSpecified},
  can_trigger = function(self, event, target, player, data)
    if not (target == player and player:hasSkill(self)) then return end
    local room = player.room
    local to = room:getPlayerById(data.to)
    local num = #to:getCardIds(Player.Hand)
    local filter = num <= player:getAttackRange() or num >= player.hp
    return data.card.trueName == "slash" and filter and player.phase == Player.Play
  end,
  on_use = function(self, event, target, player, data)
    data.disresponsiveList = data.disresponsiveList or {}
    table.insert(data.disresponsiveList, data.to)
  end,
}
local liegongAR = fk.CreateAttackRangeSkill{
  name = "#zhonger_st_heg__liegongAR",
  correct_func = function(self, from, to)
    if from:hasSkill("zhonger_st_heg__liegong") then
      for _, p in ipairs(Fk:currentRoom().alive_players) do
        if string.find(p.general, "lord") and p:hasSkill("shouyue") and p.kingdom == from.kingdom then
          return 1
        end
      end
    end
    return 0
  end,
}
local liegong_t = fk.CreateTargetModSkill{
  name = "#ZE__liegong_targetmod",
    bypass_distances =  function(self, player, skill, card, target)
    if skill.trueName == "slash_skill" and player:hasSkill(liegong) then
      return card and target and player:distanceTo(target) <= card.number
    end
  end,
}
liegong:addRelatedSkill(liegongAR)
liegong:addRelatedSkill(liegong_t)
huangzhong:addSkill(liegong)
huangzhong:addCompanions("zhonger_st_heg__weiyan")
Fk:loadTranslationTable{
  ["zhonger_st_heg__huangzhong"] = "黄忠",
  ["#zhonger_st_heg__huangzhong"] = "老当益壮",
  ["illustrator:zhonger_st_heg__huangzhong"] = "匠人绘",
  ["zhonger_st_heg__liegong"] = "烈弓",
  [":zhonger_st_heg__liegong"] = "你对至其距离不大于此【杀】点数的角色使用【杀】无距离关系的限制。当你于出牌阶段内使用【杀】指定目标后，若其手牌数不小于你的体力值或不大于你的攻击范围，你可令其不能使用【闪】响应此【杀】。",
  ["$zhonger_st_heg__liegong1"] = "龙骨成镞，矢破苍穹。",
  ["$zhonger_st_heg__liegong2"] = "凤翎为羽，箭没坚城。",
  ["~zhonger_st_heg__huangzhong"] = "末将有负主公重托……",
}

local weiyan = General(extension, "zhonger_st_heg__weiyan", "shu", 4, 4,  General.Male)
weiyan:addSkill("hs__kuanggu")
Fk:loadTranslationTable{
  ["zhonger_st_heg__weiyan"] = "魏延",
  ["#zhonger_st_heg__weiyan"] = "嗜血的独狼",
  ["illustrator:zhonger_st_heg__weiyan"] = "瞌瞌一休",
  ["~zhonger_st_heg__weiyan"] = "奸贼……害我……",
}

local pangtong = General(extension, "zhonger_st_heg__pangtong", "shu",3, 3,  General.Male)
pangtong:addSkill("lianhuan")
pangtong:addSkill("niepan")
pangtong:addCompanions("zhonger_st_heg__wolong")
Fk:loadTranslationTable{
  ['zhonger_st_heg__pangtong'] = '庞统',
  ["#zhonger_st_heg__pangtong"] = "凤雏",
  ["illustrator:zhonger_st_heg__pangtong"] = "KayaK",
  ["~zhonger_st_heg__pangtong"] = "看来我命中注定将丧命于此……",
}

local wolong = General(extension, "zhonger_st_heg__wolong", "shu", 3, 3,  General.Male)
wolong:addSkill("bazhen")
wolong:addSkill("huoji")
wolong:addSkill("kanpo")
Fk:loadTranslationTable{
  ['zhonger_st_heg__wolong'] = '卧龙诸葛亮',
  ["#zhonger_st_heg__wolong"] = "卧龙",
  ["illustrator:zhonger_st_heg__wolong"] = "绘聚艺堂",
  ["~zhonger_st_heg__wolong"] = "我的计谋竟被……",
}

local liushan = General(extension, "zhonger_st_heg__liushan", "shu", 3, 3,  General.Male)
liushan:addSkill("xiangle")
liushan:addSkill("fangquan")
Fk:loadTranslationTable{
  ['zhonger_st_heg__liushan'] = '刘禅',
  ["#zhonger_st_heg__liushan"] = "无为的真命主",
  ["illustrator:zhonger_st_heg__liushan"] = "LiuHeng",
  ["~zhonger_st_heg__liushan"] = "别打脸，我投降还不行吗？",
}

local menghuo = General(extension, "zhonger_st_heg__menghuo", "shu", 4, 4,  General.Male)
menghuo:addCompanions("zhonger_st_heg__zhurong")
menghuo:addSkill("huoshou")
menghuo:addSkill("zaiqi")
Fk:loadTranslationTable{
  ['zhonger_st_heg__menghuo'] = '孟获',
  ["#zhonger_st_heg__menghuo"] = "南蛮王",
  ["illustrator:zhonger_st_heg__menghuo"] = "废柴男",
  ["~zhonger_st_heg__menghuo"] = "七纵之恩……来世……再报了……",

}

local zhurong = General(extension, "zhonger_st_heg__zhurong", "shu", 4, 4, General.Female)
zhurong:addSkill("juxiang")
zhurong:addSkill("lieren")
Fk:loadTranslationTable{
  ['zhonger_st_heg__zhurong'] = '祝融',
  ["#zhonger_st_heg__zhurong"] = "野性的女王",
  ["illustrator:zhonger_st_heg__zhurong"] = "废柴男",
  ["~zhonger_st_heg__zhurong"] = "大王，我，先走一步了。",

}

local ganfuren = General(extension, "zhonger_st_heg__ganfuren", "shu", 3, 3, General.Female)
ganfuren:addSkill("hs__shushen")
ganfuren:addSkill("shenzhi")

Fk:loadTranslationTable{
  ['zhonger_st_heg__ganfuren'] = '甘夫人',
  ["#zhonger_st_heg__ganfuren"] = "昭烈皇后",
  ["illustrator:zhonger_st_heg__ganfuren"] = "琛·美弟奇",
  ["designer:zhonger_st_heg__ganfuren"] = "淬毒",
  ["$zhonger_st_heg__shushen1"] = "船到桥头自然直。",
  ["$zhonger_st_heg__shushen2"] = "妾身无恙，相公请安心征战。",
  ["~zhonger_st_heg__ganfuren"] = "请替我照顾好阿斗……",
}

local sunquan = General(extension, "zhonger_st_heg__sunquan", "wu", 4, 4,  General.Male)
sunquan:addSkill("hs__zhiheng")
sunquan:addCompanions("zhonger_st_heg__zhoutai")
Fk:loadTranslationTable{
  ["zhonger_st_heg__sunquan"] = "孙权",
  ["#zhonger_st_heg__sunquan"] = "年轻的贤君",
  ["illustrator:zhonger_st_heg__sunquan"] = "KayaK",
  ["~zhonger_st_heg__sunquan"] = "父亲，大哥，仲谋愧矣……",
}

local ganning = General(extension, "zhonger_st_heg__ganning", "wu", 4, 4,  General.Male)
ganning:addSkill("qixi")
Fk:loadTranslationTable{
  ["zhonger_st_heg__ganning"] = "甘宁",
  ["#zhonger_st_heg__ganning"] = "锦帆游侠",
  ["illustrator:zhonger_st_heg__ganning"] = "KayaK",
  ["~zhonger_st_heg__ganning"] = "二十年后，又是一条好汉！",
}

local lvmeng = General(extension, "zhonger_st_heg__lvmeng", "wu", 4, 4,  General.Male)
lvmeng:addSkill("hs__keji")
lvmeng:addSkill("hs__mouduan")
Fk:loadTranslationTable{
  ["zhonger_st_heg__lvmeng"] = "吕蒙",
  ["#zhonger_st_heg__lvmeng"] = "士别三日",
  ["$hs__keji_zhonger_st_heg__lvmeng1"] = "蓄力待时，不争首功。",
  ["$hs__keji_zhonger_st_heg__lvmeng2"] = "最好的机会，还在等着我…",
  ["$hs__mouduan_zhonger_st_heg__lvmeng1"] = "厚积而薄发。",
  ["$hs__mouduan_zhonger_st_heg__lvmeng2"] = "我胸怀的是这天下。",
  ["illustrator:zhonger_st_heg__lvmeng"] = "樱花闪乱",
  ["~zhonger_st_heg__lvmeng"] = "你，给我等着。",
}

local huanggai = General(extension, "zhonger_st_heg__huanggai", "wu", 4, 4,  General.Male)
huanggai:addSkill("hs__kurou")
huanggai:addCompanions("zhonger_st_heg__zhouyu")
Fk:loadTranslationTable{
  ["zhonger_st_heg__huanggai"] = "黄盖",
  ["#zhonger_st_heg__huanggai"] = "轻身为国",
  ["illustrator:zhonger_st_heg__huanggai"] = "G.G.G.",
  ["~zhonger_st_heg__huanggai"] = "盖，有负公瑾重托……",
}

local zhouyu = General(extension, "zhonger_st_heg__zhouyu", "wu", 3, 3,  General.Male)
zhouyu:addSkill("ex__yingzi")
zhouyu:addSkill("ex__fanjian")
zhouyu:addCompanions("zhonger_st_heg__xiaoqiao")
Fk:loadTranslationTable{
  ["zhonger_st_heg__zhouyu"] = "周瑜",
  ["#zhonger_st_heg__zhouyu"] = "大都督",
  ["illustrator:zhonger_st_heg__zhouyu"] = "绘聚艺堂",
  ["~zhonger_st_heg__zhouyu"] = "既生瑜，何生亮。既生瑜，何生亮！",
}

local daqiao = General(extension, "zhonger_st_heg__daqiao", "wu", 3, 3, General.Female)
daqiao:addSkill("guose")
daqiao:addSkill("liuli")
daqiao:addCompanions("zhonger_st_heg__xiaoqiao")

Fk:loadTranslationTable{
  ["zhonger_st_heg__daqiao"] = "大乔",
  ["#zhonger_st_heg__daqiao"] = "矜持之花",
  ["illustrator:zhonger_st_heg__daqiao"] = "KayaK",
  ["~zhonger_st_heg__daqiao"] = "伯符，我去了……",
}

local luxun = General(extension, "zhonger_st_heg__luxun", "wu", 3, 3,  General.Male)
luxun:addSkill("hs__qianxun")
luxun:addSkill("duoshi")
Fk:loadTranslationTable{
  ["zhonger_st_heg__luxun"] = "陆逊",
  ["#zhonger_st_heg__luxun"] = "擎天之柱",
  ["illustrator:zhonger_st_heg__luxun"] = "KayaK",
  ["$hs__qianxun_zhonger_st_heg__luxun1"] = "儒生脱尘，不为贪逸淫乐之事。",
  ["$hs__qianxun_zhonger_st_heg__luxun2"] = "谦谦君子，不饮盗泉之水。",
  ["$duoshi_zhonger_st_heg__luxun1"] = "依今日之大势，当行此计。",
  ["$duoshi_zhonger_st_heg__luxun2"] = "国之大计，审势为先。",
  ["~zhonger_st_heg__luxun"] = "我还是太年轻了……",
}

local sunshangxiang = General(extension, "zhonger_st_heg__sunshangxiang", "wu", 3, 3, General.Female)
sunshangxiang:addSkill("xiaoji")
sunshangxiang:addSkill("jieyin")
Fk:loadTranslationTable{
  ["zhonger_st_heg__sunshangxiang"] = "孙尚香",
  ["#zhonger_st_heg__sunshangxiang"] = "弓腰姬",
  ["illustrator:zhonger_st_heg__sunshangxiang"] = "凡果",
  ["~zhonger_st_heg__sunshangxiang"] = "不！还不可以死！",
}

local sunjian = General:new(extension, "zhonger_st_heg__sunjian", "wu", 5)
sunjian:addSkill("yinghun")
Fk:loadTranslationTable{
  ['zhonger_st_heg__sunjian'] = '孙坚',
  ["#zhonger_st_heg__sunjian"] = "武烈帝",
  ["illustrator:zhonger_st_heg__sunjian"] = "LiuHeng",
  ["~zhonger_st_heg__sunjian"] = "有埋伏！呃……啊！！",
}

local xiaoqiao = General(extension, "zhonger_st_heg__xiaoqiao", "wu", 3, 3, General.Female)
xiaoqiao:addSkill("ol_ex__tianxiang")
xiaoqiao:addSkill("hongyan")
Fk:loadTranslationTable{
  ['zhonger_st_heg__xiaoqiao'] = '小乔',
  ["#zhonger_st_heg__xiaoqiao"] = "矫情之花",
  ["$ol_ex__tianxiang_zhonger_st_heg__xiaoqiao1"] = "盈盈一笑，娇花照水。",
  ["$ol_ex__tianxiang_zhonger_st_heg__xiaoqiao2"] = "玉容花貌难自弃。",
  ["illustrator:zhonger_st_heg__xiaoqiao"] = "绘聚艺堂",
  ["~zhonger_st_heg__xiaoqiao"] = "公瑾…我先走一步……",
}

local taishici = General(extension, "zhonger_st_heg__taishici", "wu", 4, 4,  General.Male)
taishici:addSkill("tianyi")
Fk:loadTranslationTable{
  ['zhonger_st_heg__taishici'] = '太史慈',
  ["#zhonger_st_heg__taishici"] = "笃烈之士",
  ["illustrator:zhonger_st_heg__taishici"] = "Tuu.",
  ["~zhonger_st_heg__taishici"] = "大丈夫，当带三尺之剑，立不世之功！",
}

local zhoutai = General(extension, "zhonger_st_heg__zhoutai", "wu", 4, 4,  General.Male)
zhoutai:addSkill("hs__buqu")
zhoutai:addSkill("hs__fenji")
Fk:loadTranslationTable{
  ['zhonger_st_heg__zhoutai'] = '周泰',
  ["#zhonger_st_heg__zhoutai"] = "历战之躯",
  ["illustrator:zhonger_st_heg__zhoutai"] = "Thinking",
  ["~zhonger_st_heg__zhoutai"] = "敌众我寡，无力回天……",
}

local lusu = General(extension, "zhonger_st_heg__lusu", "wu", 3, 3,  General.Male)
lusu:addSkill("haoshi")
lusu:addSkill("dimeng")
Fk:loadTranslationTable{
  ['zhonger_st_heg__lusu'] = '鲁肃',
  ["#zhonger_st_heg__lusu"] = "独断的外交家",
  ["illustrator:zhonger_st_heg__lusu"] = "LiuHeng",
  ["~zhonger_st_heg__lusu"] = "此联盟已破，吴蜀休矣。",
}

local erzhang = General(extension, "zhonger_st_heg__zhangzhaozhanghong", "wu", 3, 3,  General.Male)
erzhang:addSkill("zhijian")
erzhang:addSkill("guzheng")
Fk:loadTranslationTable{
  ['zhonger_st_heg__zhangzhaozhanghong'] = '张昭张纮',
  ["#zhonger_st_heg__zhangzhaozhanghong"] = "经天纬地",
  ["illustrator:zhonger_st_heg__zhangzhaozhanghong"] = "废柴男",
  ["~zhonger_st_heg__zhangzhaozhanghong"] = "竭力尽智，死而无憾。",
}

local dingfeng = General(extension, "zhonger_st_heg__dingfeng", "wu", 4, 4,  General.Male)
dingfeng:addSkill("duanbing")
dingfeng:addSkill("fenxun")
Fk:loadTranslationTable{
  ["zhonger_st_heg__dingfeng"] = "丁奉",
  ["#zhonger_st_heg__dingfeng"] = "清侧重臣",
  ["illustrator:zhonger_st_heg__dingfeng"] = "魔鬼鱼",
  ["~zhonger_st_heg__dingfeng"] = "这风，太冷了……",
}

local huatuo = General(extension, "zhonger_st_heg__huatuo", "qun", 3, 3,  General.Male)
huatuo:addSkill("jijiu")
huatuo:addSkill("hs__chuli")
Fk:loadTranslationTable{
  ["zhonger_st_heg__huatuo"] = "华佗",
  ["#zhonger_st_heg__huatuo"] = "神医",
  ["illustrator:zhonger_st_heg__huatuo"] = "琛·美弟奇",
  ["~zhonger_st_heg__huatuo"] = "生老病死，命不可违。",
}

local lvbu = General(extension, "zhonger_st_heg__lvbu", "qun", 5, 5, General.Male)
lvbu:addSkill("wushuang")
lvbu:addCompanions("zhonger_st_heg__diaochan")
Fk:loadTranslationTable{
  ["zhonger_st_heg__lvbu"] = "吕布",
  ["#zhonger_st_heg__lvbu"] = "武的化身",
  ["~zhonger_st_heg__lvbu"] = "不可能！",
}

local diaochan = General(extension, "zhonger_st_heg__diaochan", "qun", 3, 3, General.Female)
diaochan:addSkill("hs__lijian")
diaochan:addSkill("biyue")

Fk:loadTranslationTable{
  ["zhonger_st_heg__diaochan"] = "貂蝉",
  ["#zhonger_st_heg__diaochan"] = "绝世的舞姬",
  ["illustrator:zhonger_st_heg__diaochan"] = "LiuHeng",
  ["~zhonger_st_heg__diaochan"] = "父亲大人，对不起……",
}

local yuanshao = General(extension, "zhonger_st_heg__yuanshao", "qun", 4, 4,  General.Male)
yuanshao:addSkill("hs__luanji")
yuanshao:addCompanions("zhonger_st_heg__yanliangwenchou")

Fk:loadTranslationTable{
  ["zhonger_st_heg__yuanshao"] = "袁绍",
  ["#zhonger_st_heg__yuanshao"] = "高贵的名门",
  ["illustrator:zhonger_st_heg__yuanshao"] = "北辰菌",
  ["~zhonger_st_heg__yuanshao"] = "老天不助我袁家啊！",
}

local sx = General(extension, 'zhonger_st_heg__yanliangwenchou', 'qun', 4, 4,  General.Male)
sx:addSkill('shuangxiong')
Fk:loadTranslationTable{
  ['zhonger_st_heg__yanliangwenchou'] = '颜良文丑',
  ["#zhonger_st_heg__yanliangwenchou"] = "虎狼兄弟",
  ["illustrator:zhonger_st_heg__yanliangwenchou"] = "KayaK",

  ["~zhonger_st_heg__yanliangwenchou"] = "这红脸长须大将是……",
}

local jiaxu = General(extension, 'zhonger_st_heg__jiaxu', 'qun', 3, 3,  General.Male)
jiaxu:addSkill('wansha')
jiaxu:addSkill('luanwu')
jiaxu:addSkill("hs__weimu")
Fk:loadTranslationTable{
  ['zhonger_st_heg__jiaxu'] = '贾诩',
  ["#zhonger_st_heg__jiaxu"] = "冷酷的毒士",
  ["illustrator:zhonger_st_heg__jiaxu"] = "绘聚艺堂",
  ["~zhonger_st_heg__jiaxu"] = "我的时辰也到了……",
}

local pangde = General(extension, "zhonger_st_heg__pangde", "qun", 4, 4,  General.Male)
pangde:addSkill("mashu")
pangde:addSkill("jianchu")
Fk:loadTranslationTable{
  ["zhonger_st_heg__pangde"] = "庞德",
  ["#zhonger_st_heg__pangde"] = "人马一体",
  ["illustrator:zhonger_st_heg__pangde"] = "凝聚永恒",
  ["$jianchu1"] = "你，可敢挡我！",
  ["$jianchu2"] = "我要杀你们个片甲不留！",
  ["~zhonger_st_heg__pangde"] = "四面都是水……我命休矣。",
}

local zhangjiao = General(extension, "zhonger_st_heg__zhangjiao", 'qun', 3, 3,  General.Male)
zhangjiao:addSkill("leiji")
zhangjiao:addSkill("guidao")
Fk:loadTranslationTable{
  ['zhonger_st_heg__zhangjiao'] = '张角',
  ["#zhonger_st_heg__zhangjiao"] = "天公将军",
  ["illustrator:zhonger_st_heg__zhangjiao"] = "LiuHeng",
  ["~zhonger_st_heg__zhangjiao"] = "黄天…也死了……",
}

local caiwenji = General(extension, "zhonger_st_heg__caiwenji", "qun", 3, 3, General.Female)
caiwenji:addSkill("beige")
caiwenji:addSkill("hs__duanchang")
Fk:loadTranslationTable{
  ["zhonger_st_heg__caiwenji"] = "蔡文姬",
  ["#zhonger_st_heg__caiwenji"] = "异乡的孤女",
  ["illustrator:zhonger_st_heg__caiwenji"] = "SoniaTang",
  ["~zhonger_st_heg__caiwenji"] = "人生几何时，怀忧终年岁。",
}

local mateng = General(extension, "zhonger_st_heg__mateng", "qun", 4, 4,  General.Male)
mateng:addSkill("heg_mateng__mashu")
mateng:addSkill("xiongyi")

Fk:loadTranslationTable{
  ["zhonger_st_heg__mateng"] = "马腾",
  ["#zhonger_st_heg__mateng"] = "驰骋西陲",
  ["desinger:zhonger_st_heg__mateng"] = "淬毒",
  ["illustrator:zhonger_st_heg__mateng"] = "DH",
  ["~zhonger_st_heg__mateng"] = "儿子，为爹报仇啊！",
}

local kongrong = General(extension, "zhonger_st_heg__kongrong", "qun", 3, 3,  General.Male)
kongrong:addSkill("mingshi")
kongrong:addSkill("lirang")
Fk:loadTranslationTable{
  ["zhonger_st_heg__kongrong"] = "孔融",
  ["#zhonger_st_heg__kongrong"] = "凛然重义",
  ["desinger:zhonger_st_heg__kongrong"] = "淬毒",
  ["illustrator:zhonger_st_heg__kongrong"] = "苍月白龙",
  ["~zhonger_st_heg__kongrong"] = "覆巢之下，岂有完卵……",
}

local jiling = General(extension, "zhonger_st_heg__jiling", "qun", 4, 4,  General.Male)
jiling:addSkill("shuangren")
Fk:loadTranslationTable{
  ["zhonger_st_heg__jiling"] = "纪灵",
  ["#zhonger_st_heg__jiling"] = "仲家的主将",
  ["illustrator:zhonger_st_heg__jiling"] = "樱花闪乱",
  ["desinger:zhonger_st_heg__jiling"] = "淬毒",
  ["~zhonger_st_heg__jiling"] = "额，将军为何咆哮不断……",
}

local tianfeng = General(extension, "zhonger_st_heg__tianfeng", "qun", 3, 3,  General.Male)
tianfeng:addSkill("sijian")
tianfeng:addSkill("suishi")
Fk:loadTranslationTable{
  ["zhonger_st_heg__tianfeng"] = "田丰",
  ["#zhonger_st_heg__tianfeng"] = "河北瑰杰",
  ["illustrator:zhonger_st_heg__tianfeng"] = "地狱许",
  ["desinger:zhonger_st_heg__tianfeng"] = "淬毒",
  ["~zhonger_st_heg__tianfeng"] = "不纳吾言而反诛吾心，奈何奈何！！",
}

local panfeng = General(extension, "zhonger_st_heg__panfeng", "qun", 4, 4,  General.Male)
panfeng:addSkill("hs__kuangfu")
Fk:loadTranslationTable{
  ["zhonger_st_heg__panfeng"] = "潘凤",
  ["#zhonger_st_heg__panfeng"] = "联军上将",
  ["illustrator:zhonger_st_heg__panfeng"] = "凡果",
  ["$hs__kuangfu_zhonger_st_heg__panfeng1"] = "大斧到处，片甲不留！",
  ["$hs__kuangfu_zhonger_st_heg__panfeng2"] = "你可接得住我一斧？",
  ["~zhonger_st_heg__panfeng"] = "潘凤又被华雄斩啦。",
}

local zoushi = General(extension, "zhonger_st_heg__zoushi", "qun", 3, 3, General.Female)
zoushi:addSkill("huoshui")
zoushi:addSkill("qingcheng")
Fk:loadTranslationTable{
  ["zhonger_st_heg__zoushi"] = "邹氏",
  ["~zhonger_st_heg__zoushi"] = "年老色衰了吗？",
}

return {card_extension, extension}